import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { Providers } from './providers';

// 配置Geist Sans字体，用于页面主要文本显示
const geistSans = Geist({
  variable: "--font-geist-sans",
  subsets: ["latin"],
});

// 配置Geist Mono字体，用于等宽字体显示场景
const geistMono = Geist_Mono({
  variable: "--font-geist-mono",
  subsets: ["latin"],
});

// 页面元数据配置
export const metadata = {
  title: "我的Next.js应用",
  description: "使用Next.js创建的现代化Web应用",
  keywords: "Next.js, React, Web应用, 前端开发",
  author: "开发者",
  viewport: "width=device-width, initial-scale=1",
  charset: "utf-8",
};

// 根布局组件，包裹所有页面内容
export default function RootLayout({ children }) {
  return (
    <html lang="zh-CN">
      <body
        className={`${geistSans.variable} ${geistMono.variable} antialiased`}
      >
        <Providers>
          {children}
        </Providers>
      </body>
    </html>
  );
}